import os
class FileTrans():
    def read_sqlfile(self,curpath):
        files = os.listdir(curpath)
        files = list(filter(lambda x: x.endswith('.txt'), files))
        sql_data = {}
        for file in files:
            with open(os.path.join(curpath, file), 'r', encoding='utf-8') as f:
                sql_data[file.split('.')[0]] = f.read()
        return sql_data
